  
    <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
      <!-- Indicators -->
      <ol class="carousel-indicators">
        <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
        <li data-target="#carousel-example-generic" data-slide-to="1"></li>
        <li data-target="#carousel-example-generic" data-slide-to="2"></li>
        <li data-target="#carousel-example-generic" data-slide-to="3"></li>
        <li data-target="#carousel-example-generic" data-slide-to="4"></li>      
      </ol>
    
      <!-- Wrapper for slides -->
      <div class="carousel-inner" style="height:250px;">
        <?php 
            for($i = 1 ; $i <= 5; $i++)
            {
                if($i == 1)
                {
                    echo "<div class='item active'>";
                    echo "<img class='imgSlide' src='". base_url('assets/imgs/hinh-phong-kham-' . $i . '.png') ."'/>";
                    echo "<div class='carousel-caption'>";
                    //echo "nội dung hình" . $i;                
                    echo "</div></div>";
                }
                else
                {
                    echo "<div class='item'>";
                    echo "<img class='imgSlide' src='". base_url('assets/imgs/hinh-phong-kham-' . $i . '.png') ."'/>";
                    echo "<div class='carousel-caption'>";
                    //echo "nội dung hình" . $i;                
                    echo "</div></div>";
                }
            }
        ?>
      </div>
    
      <!-- Controls -->
      <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
        <span class="glyphicon glyphicon-chevron-left"></span>
      </a>
      <a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
        <span class="glyphicon glyphicon-chevron-right"></span>
      </a>
    </div>  
    <br />
        <?php 
            if(isset($baiviet))
            {
                for($i = 0 ; $i < count($baiviet); $i++)
                {
                    $imageLink = $baiviet[$i]['imagelink'];
                    $tieude = $baiviet[$i]['tieude'];      
                    $id = $baiviet[$i]['id'];
                    $madanhmuc =$baiviet[$i]['madanhmuc'];
                    $madanhmuc_cha = $baiviet[$i]['madanhmuc_cha'];
                    $baiviet_viet = strip_tags($baiviet[$i]['noidungbaiviet_viet']);
                    if($i % 2 == 0)
                    {                    
                        echo "<div class='row'>";
                        echo "<div class='col-xs-5 col-sm-6'>";
                        echo "<div class='panel panel-info'>";
                        echo "<div class='panel-heading'>";
                        echo "<img src='$imageLink' class='img-rounded' alt='Nha khoa Toàn Mỹ' />";
                        echo $tieude;
                        echo "</div>";
                        echo "<div class='panel-body'>";
                        echo word_limiter($baiviet_viet, 40);
                        echo "<a href='". base_url('tintuc/view?tieude=' . $tieude . '&madanhmuc=' . $madanhmuc . '&id=' . $id . '&madanhmuc_cha=' . $madanhmuc_cha) ."'>Xem thêm &rarr;</a>";
                        echo "</div></div></div>";
                    }
                    else
                    {   
                        echo "<div class='col-xs-5 col-sm-6'>";
                        echo "<div class='panel panel-info'>";
                        echo "<div class='panel-heading'>";
                        echo "<img src='$imageLink' class='img-rounded' alt='Nha khoa Toàn Mỹ' />";
                        echo $tieude;
                        echo "</div>";
                        echo "<div class='panel-body'>";
                        echo word_limiter($baiviet_viet, 40);
                        echo "<a href='". base_url('tintuc/view?tieude=' . $tieude . '&madanhmuc=' . $madanhmuc . '&id=' . $id . '&madanhmuc_cha=' . $madanhmuc_cha) ."'>Xem thêm &rarr;</a>";
                        echo "</div></div></div></div>";
                    }
                }
            }
        ?>
       </div>